<template>
  <div class="container">
    <NavBar>
      <div slot="left" class="back" @click="back"><img src="../../../assets/image/back.png" alt=""/></div>
      <div slot="center">打卡详情</div>
    </NavBar>
    <div class="info">
      <div class="time">打卡时间：{{ info.time.split('T')[0]+'   '+info.time.split('T')[1] }}</div>
      <div class="time">打卡地点：{{ info.address }}</div>
    </div>
    <div class="center">
      <div>是否迟到：否</div>
    </div>
    <div class="slot">备注：无</div>
  </div>
</template>

<script>
import NavBar from "../../common/navbar/NavBar";

export default {
  name: "detail",
  components: {
    NavBar
  },
  data() {
    return {
      info: {}
    }
  },
  mounted(e) {
    this.info = this.$route.query.info
    console.log(this.info)
  },
  computed: {
    getTime1() {
      let that = this
      let time = that.info.begin
      time = time.split('T')
      return () => {
        return time[0] + ' ' + time[1]
      }
    }
  },
  methods: {
    back() {
      this.$router.back()
    }
  }
}
</script>

<style scoped>
.time {
  color: white;
  font-size: 22px;
}

.pp {
  font-size: 30px;
  font-weight: bold;
  margin-left: -10px;
}

.container {
  background-image: url("../../../../src/assets/image/background.png");
  background-size: 100% 100%;
  height: 100vh;
}

.left img {
  width: 30px;
  height: 30px;
  margin-top: 5px;
}
.back img{
  height: auto;
  width: 40px;
}
.info {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  width: 98%;
  height: 150px;
  margin-top: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  margin-left: 1%;
}

.info div {
  margin-left: 25px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.p2 {
  position: absolute;
  margin-top: 20px;
  margin-left: 280px;
}

.p2 img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
}

.center {
  background-color: rgba(255, 255, 255, 0.5);
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  width: 98%;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin-left: 1%;
}

.slot {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  width: 98%;
  background-color: rgba(255, 255, 255, 0.5);
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin-left: 1%;
}
</style>
